import QtQuick 2.0
import QtQuick.Controls 2.1

Rectangle {
    id: root;
    color: "white";

    TextEdit {
        id: textEdit
        text: qsTr("Enter some text...")
        verticalAlignment: Text.AlignVCenter
        anchors.top: parent.top
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.topMargin: 20
        font.family: "Ubuntu";
        font.pointSize: 18;
        Rectangle {
            anchors.fill: parent
            anchors.margins: -10
            color: "transparent"
            border.width: 1
            border.color: "red";
        }
    }

    Button {
        id: btnQuit;
        text: qsTr("Quit");
        anchors.horizontalCenter: parent.horizontalCenter;
        anchors.top: textEdit.bottom;
        anchors.topMargin: 20;
        font.family: "Consolas";
        font.pointSize: 20;

        onClicked: {
            Qt.quit();
        }
    }

    Row {
        id: row1;
        anchors.horizontalCenter: parent.horizontalCenter;
        anchors.top: btnQuit.bottom;
        anchors.topMargin: 20;
        spacing: 6;

        Text {
            id: text1;
            font.family: "Consolas";
            font.pointSize: 16;
            text: qsTr("Normal");
        }

        Text {
            id: text2;
            font.family: "Consolas";
            font.pointSize: 16;
            text: qsTr("Raised");
            style: Text.Raised;
            styleColor: "#AAAAAA";
        }

        Text {
            id: text3;
            font.family: "Consolas";
            font.pointSize: 16;
            text: qsTr("Outline");
            style: Text.Outline;
            styleColor: "red";
        }

        Text {
            id: text4;
            font.family: "Consolas";
            font.pointSize: 16;
            text: qsTr("Sunken");
            style: Text.Sunken;
            styleColor: "#AAAAAA";
        }
    }

    DButton {
        id: dBtn;
        anchors.horizontalCenter: parent.horizontalCenter;
        anchors.top: row1.bottom;
        anchors.topMargin: 20;
        text: qsTr("Mingxinke");

        onClicked: {
            textShow.text = qsTr("Clicked button...");
        }
    }

    Text {
        id: textShow;
        anchors.left: dBtn.right;
        anchors.leftMargin: 20;
        anchors.top: dBtn.top;
        anchors.bottom: dBtn.bottom;
        verticalAlignment: Qt.AlignVCenter;


        text: qsTr("DButton");
    }
}
